package dcp.bss.common.util;


import org.apache.commons.codec.binary.Base64;



public class Base64Util {


	/**
	 * 对String类型的数据进行base64加密
	 *
	 */
	public static String encode(String strData) throws Exception {
		byte[] encodeBase64 = Base64.encodeBase64(strData.getBytes("UTF-8"));
		return new String(encodeBase64,"UTF-8");

	}

	public static String decode(String strData) throws Exception {
		byte[] decodeBase64 = Base64.decodeBase64(strData.getBytes("UTF-8"));
		String base64decoded=new String(decodeBase64,"UTF-8");
		return base64decoded;

	}

	public  static  void main(String args[]) throws Exception {

		String soapStr="UEQ5NGJXd2dkbVZ5YzJsdmJqMGlNUzR3SWlCbGJtTnZaR2x1WnowaWRYUm1MVGdpUHo0TkNqeFNiMjkwUGcwS0lDQThTR1ZoWkdWeVBnMEtJQ0FnSUR4TlpYTnpZV2RsVW1WbVpYSmxibU5sVG5WdFltVnlQalF5TXpCak5UZ3pMVE13T1RZdE5ESmhNQzA1TldGaExXVm1Oek0wTW1WalpqZzFNRHd2VFdWemMyRm5aVkpsWm1WeVpXNWpaVTUxYldKbGNqNE5DaUFnSUNBOFJHOWpkVzFsYm5ST1lXMWxQdVdOc2VtWnFlV1RnZWkva09pK2srZVV0ZVd0a09pM3IrV05sVHd2Ukc5amRXMWxiblJPWVcxbFBnMEtJQ0FnSUR4RWIyTjFiV1Z1ZEZabGNuTnBiMjVPZFcxaVpYSStNakF4TkR3dlJHOWpkVzFsYm5SV1pYSnphVzl1VG5WdFltVnlQZzBLSUNBZ0lEeFRaVzVrWlhKRGIyUmxQamt4T1RROEwxTmxibVJsY2tOdlpHVStEUW9nSUNBZ1BFMWxjM05oWjJWR2RXNWpkR2x2YmtOdlpHVStPVHd2VFdWemMyRm5aVVoxYm1OMGFXOXVRMjlrWlQ0TkNpQWdQQzlJWldGa1pYSStEUW9nSUR4Q2IyUjVQZzBLSUNBZ0lEeEtiMkpQY21SbGNrNTFiV0psY2o0ek16QTRNREV3TURNd01ESXRXVEUyTURZeE5EQXdPVFU4TDBwdllrOXlaR1Z5VG5Wd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